::@echo off
@set X509_NAME=TestPk
@set PVK_PASSWORD=12345678

:Gen_pvk_cer
makecert.exe -n "CN=%X509_NAME%" -r -sv %X509_NAME%.pvk %X509_NAME%.cer
:: -r Create a self signed certificate
:: -sv <pvkFile>  Subject's PVK file; To be created if not present

:Gen_spc_file
Cert2Spc.exe %X509_NAME%.cer %X509_NAME%.spc

:Gen_pfx_file
pvk2pfx.exe -pvk %X509_NAME%.pvk -pi %PVK_PASSWORD% -spc %X509_NAME%.spc -pfx %X509_NAME%.pfx

@pause